package com.ericom.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
@Entity
public class PaymentMethod extends BaseObject {

	@Override
	public String toString() {
		return new ToStringBuilder(this).append("id", id).append("name", name)
				.append("description", description).append("version", version)
				.append("vender", vender).append("chargeRate", chargeRate)
				.toString();
	}

	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof PaymentMethod))
			return false;
		PaymentMethod castOther = (PaymentMethod) other;
		return new EqualsBuilder().append(name, castOther.name)
				.append(description, castOther.description)
				.append(version, castOther.version)
				.append(vender, castOther.vender)
				.append(chargeRate, castOther.chargeRate).isEquals();
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(name).append(description)
				.append(version).append(vender).append(chargeRate).toHashCode();
	}

	private Long id;
	private String name;
	private String description;
	private String version;
	private String vender;
	private Double chargeRate;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getVender() {
		return vender;
	}

	public void setVender(String vender) {
		this.vender = vender;
	}

	public Double getChargeRate() {
		return chargeRate;
	}

	public void setChargeRate(Double chargeRate) {
		this.chargeRate = chargeRate;
	}
	

}
